<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php JHTML::_('behavior.tooltip'); ?>
<form action="index.php?option=com_articlecashrewards" method="post" name="adminForm">
<div id="submenu-box">
    <div class="t">
        <div class="t">
            <div class="t"></div>
        </div>
    </div>
    <div class="m">
        <ul id="submenu">
            <li>
                <a class="active" href="index.php?option=com_articlecashrewards&controller=weblinks&task=pending"><?php echo JText::_('LABEL_PENDING');?></a>
            </li>
            <li>
                <a href="index.php?option=com_articlecashrewards&controller=weblinks&task=approved"><?php echo JText::_('LABEL_APPROVED');?></a>
            </li>
            <li>
                <a href="index.php?option=com_articlecashrewards&controller=weblinks&task=rejected"><?php echo JText::_('LABEL_REJECTED');?></a>
            </li>
        </ul>
        <div class="clr"></div>
    </div>
    <div class="b">
        <div class="b">
            <div class="b"></div>
        </div>
    </div>
</div>
<table class="adminlist" cellspacing="1">
	<thead>
		<tr>
			<th width="5">
				<?php echo JText::_( 'Num' ); ?>
			</th>
			<th width="20">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->rows ); ?>);" />
			</th>
			<th class="title">
				<?php echo JText::_('ID'); ?>
			</th>
			<th class="title">
				<?php echo JText::_('LABEL_WEBLINK'); ?>
			</th>
			<th width="15%" class="title">
				<?php echo JHTML::_('grid.sort', JText::_('LABEL_DATE_SUBMITTED'), 'aw.date_submitted', @$lists['order_Dir'], @$lists['order'] ); ?>
			</th>
			<th width="25%" class="title">
				<?php echo JText::_('LABEL_DESCRIPTION'); ?>
			</th>
			<th width="10%" class="title">
				<?php echo JHTML::_('grid.sort', JText::_('LABEL_AUTHOR'),  'u.username', @$lists['order_Dir'], @$lists['order'] ); ?>
			</th>
		</tr>
	</thead>
	<tbody>
		<?php
		if($this->rows){
			
			$k = 0;
			$i = 0;
			$user =& JFactory::getUser();
			foreach ($this->rows as $row){
				
                $checked 	= JHTML::_('grid.id', $i,  $row->id  );
				$href = JRoute::_('index.php?option=com_articlecashrewards&controller=weblinks&task=review&cid='.$row->id.'&redirect=0');
				?>
				<tr class="<?php echo "row$k"; ?>">
					<td align="left">
						<?php echo $this->pagination->getRowOffset( $i); ?>
					</td>
					<td align="left">
						<?php echo $checked; ?>
					</td>
                    <td>
                        <a href="<?php echo $href; ?>"><?php echo $row->id; ?></a>
                    </td>
					<td align="left">
						<span class="editlinktip hasTip" title="<?php echo JText::_( 'TOOLTIP_REVIEW_WEBLINK' );?>::<?php echo $row->weblink; ?>">
							<a href="<?php echo $row->weblink; ?>" target="_blank"><?php echo $row->weblink; ?></a>
						</span>
					</td>
					<td align="left">
						<span class="editlinktip hasTip">
							<?php echo $row->d_submitted; ?>
						</span>
					</td>
					<td align="left">
						<span class="editlinktip hasTip">
							<?php echo $row->description; ?>
						</span>
					</td>
					<td align="left">
						<?php echo $row->author; ?>
					</td>
				</tr>
				<?php
				$k = 1 - $k;
				$i++;
			}
		}
		?>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td>
		</tr>
	</tfoot>
</table>
<input type="hidden" name="option" value="com_articlecashrewards" />
<input type="hidden" name="controller" value="weblinks" />
<input type="hidden" name="task" value="pending" />
<input type="hidden" name="redirect" value="0" />
<input type="hidden" name="pnlimitstart" value="<?php echo $this->pagination->limitstart; ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
